home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1994 April / Inside Multimedia CD-ROM (April 1994).iso / prg / gs / gssource.exe / TBCPLUS.MAK < prev    next >
Encoding:
Text File  |  1992-08-24  |  8.4 KB  |  282 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Borland C++ platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting TDEBUG=1 includes symbol table information for the Borland debugger.
  48. # No execution time or space penalty, just larger .OBJ and .EXE files
  49. # and slower linking.
  50.  
  51. TDEBUG=0
  52.  
  53. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  54. # so they are visible to the debugger and profiler.
  55. # No execution time or space penalty, just larger .OBJ and .EXE files.
  56.  
  57. NOPRIVATE=0
  58.  
  59. # ------ Platform-specific options ------ #
  60.  
  61. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  62. # and set ASM to the name of the assembler you are using.  This can be
  63. # a full path name if you want.  Normally it will be masm or tasm.
  64.  
  65. USE_ASM=1
  66. ASM=tasm
  67.  
  68. # Define the drive, directory, and compiler name for the Turbo C files.
  69. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  70. # COMPDIR contains the compiler and linker (normally \bc\bin).
  71. # BGIDIR contains the BGI files (normally /bc/bgi).
  72. #   (These are only needed if you include the BGI driver.)
  73. # INCDIR contains the include files (normally \bc\include).
  74. # LIBDIR contains the library files (normally \bc\lib).
  75. # Note that these prefixes are always followed by a \,
  76. #   so if you want to use the current directory, use an explicit '.'.
  77.  
  78. COMP=bcc
  79. COMPDIR=c:\bc\bin
  80. # For BGIDIR, use / to indicate directories, not \.
  81. BGIDIR=c:/bc/bgi
  82. INCDIR=c:\bc\include
  83. LIBDIR=c:\bc\lib
  84.  
  85. # Define whether you want to use the Borland code overlay mechanism
  86. # (VROOMM).  Code overlays make it possible to process larger files,
  87. # but code swapping will slow Ghostscript down even on smaller ones.
  88. # See the file overlay.h to control details of overlaying such as
  89. # the overlay buffer size, whether to use EMS and/or extended memory
  90. # to store evicted overlays, and how much of that memory to use.
  91.  
  92. OVERLAY=1
  93.  
  94. # Choose platform-specific options.
  95.  
  96. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  97. # (The 8086 and 8088 both correspond to processor type 86.)
  98. # 286 and up do not use protected mode.  Higher numbers produce
  99. # code that may be significantly smaller and faster, but the executable
  100. # will bail out with an error message on lower-numbered processor types.
  101.  
  102. CPU_TYPE=86
  103.  
  104. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  105. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  106. # CPU includes the equivalent of an 80387 on-chip.
  107. # A non-zero option means that the executable will only run if a FPU
  108. # of that type (or higher) is available: this is NOT currently checked
  109. # at runtime.
  110. #   Code is significantly faster.
  111.  
  112. FPU_TYPE=0
  113.  
  114. # ---------------------------- End of options ---------------------------- #
  115.  
  116. # Swapping `make' out of memory makes linking much faster.
  117.  
  118. .swap
  119.  
  120. # Define the platform name.
  121.  
  122. PLATFORM=tbc_
  123.  
  124. # Define the name of the makefile -- used in dependencies.
  125.  
  126. MAKEFILE=tbcplus.mak
  127.  
  128. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  129. # but we need to preconstruct ccf.tr to get around the limit on
  130. # the maximum length of a command line.
  131.  
  132. AK=ccf.tr
  133.  
  134. # Define the compilation flags for an 80286.
  135. # This is void because we handle -2 and -3 in ccf.tr (see below).
  136.  
  137. F286=
  138.  
  139. # Figure out which version of Borland C++ we are running.
  140. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  141. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  142. # We care because 3.0 has additional optimization features.
  143. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  144. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  145.  
  146. EXIST_BC3_1=exist $(INCDIR)\win30.h
  147.  
  148. !if $(__MAKE__) >= 0x360
  149. CO=-Obe -Z
  150. !else
  151. CO=-O
  152. !endif
  153.  
  154. !include "tccommon.mak"
  155.  
  156. # Define the compilation flags.
  157.  
  158. !if $(NOPRIVATE)
  159. CP=-DNOPRIVATE
  160. !else
  161. CP=
  162. !endif
  163.  
  164. !if $(DEBUG) | $(TDEBUG)
  165. CS=-N
  166. !else
  167. CS=
  168. !endif
  169.  
  170. !if $(DEBUG)
  171. CD=-DDEBUG
  172. !else
  173. CD=
  174. !endif
  175.  
  176. !if $(TDEBUG)
  177. CT=-v
  178. LCT=/v
  179. !else
  180. CT=-y
  181. LCT=/m /l
  182. !endif
  183.  
  184. GENOPT=$(CP) $(CS) $(CD) $(CT)
  185.  
  186. !if $(OVERLAY)
  187. CY=-Y
  188. CYO=-Yo -zAOVLY
  189. LO=/oOVLY
  190. LIBOVL=$(LIBDIR)\overlay
  191. OVLH=overlay.h
  192. !else
  193. CY=
  194. CYO=
  195. LO=
  196. LIBOVL=
  197. OVLH=
  198. !endif
  199.  
  200. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  201. CC=$(COMPDIR)\$(COMP) @ccf.tr
  202. CCC=$(CC) $(CYO) $(CO) -c
  203. CCD=$(CC) $(CYO) -O -c
  204. CC0=$(CC) $(CYO) -c
  205. CCINT=$(CC) $(CYO) -c
  206.  
  207. .c.obj:
  208.     $(CCC) { $<}
  209.  
  210. # ------ Devices and features ------ #
  211.  
  212. # Choose the language feature(s) to include.  See gs.mak for details.
  213. # Even though code overlays are available, we don't include any of the
  214. # optional features, because they cost a significant amount of non-code space.
  215.  
  216. FEATURE_DEVS=
  217.  
  218. # Choose the device(s) to include.  See devs.mak for details.
  219. # We don't include the BGI driver, because it takes 10K of
  220. # non-overlayable code space.
  221.  
  222. DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev
  223. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  224. DEVICE_DEVS3=gifmono.dev gif8.dev
  225. !include "gs.mak"
  226. !include "devs.mak"
  227.  
  228. # Build the compiler response file depending on the selected options.
  229.  
  230. ccf.tr: $(MAKEFILE) makefile
  231. !if $(CPU_TYPE) < 286
  232.     echo -a -d -r -G -X -I$(INCDIR) $(CCFLAGS) >ccf.tr
  233. !else
  234.     echo -2 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS) >ccf.tr
  235. !  if $(CPU_TYPE) > 286
  236.     echo -3 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS) >_temp_
  237.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  238. !  endif
  239. !endif
  240.  
  241. # -------------------------------- Library -------------------------------- #
  242.  
  243. # The Turbo/Borland C(++) platform
  244.  
  245. tbc__=gp_itbc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  246. tbc_.dev: $(tbc__)
  247.     $(SHP)gssetmod tbc_ $(tbc__)
  248.  
  249. # We have to compile gp_itbc without -1, because it includes a run-time
  250. # check to make sure we are running on the right kind of processor.
  251. gp_itbc.$(OBJ): gp_itbc.c $(string__h) $(gx_h) $(gp_h) \
  252.  $(OVLH) $(MAKEFILE) makefile
  253.     $(CC) $(CCFLAGS) -1- $(CY) -DCPU_TYPE=$(CPU_TYPE) -c gp_itbc.c
  254.  
  255. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  256.  
  257. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  258.  
  259. # ----------------------------- Main program ------------------------------ #
  260.  
  261. BEGINFILES=ccf.tr
  262.  
  263. iutilasm.$(OBJ): iutilasm.asm
  264.  
  265. # Get around the fact that the DOS shell has a rather small limit on
  266. # the length of a command line.  (sigh)
  267.  
  268. LIBCTR=libc$(MM).tr
  269.  
  270. $(LIBCTR): $(MAKEFILE) makefile
  271.     echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR)
  272.  
  273. LIBDOS=$(LIB) obj.tr
  274.  
  275. # Interpreter main program
  276.  
  277. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  278.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr
  279.  
  280. gs.exe: $(GS_ALL)
  281.     tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR)
  282.